package com.snack.system.service.impl;

import com.snack.system.domain.TsOrderExtra;
import com.snack.system.mapper.TsOrderExtraMapper;
import com.snack.system.service.ITsOrderExtraService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单额外费用Service业务层处理
 * 
 * @author snack
 * @date 2022-09-18
 */
@Service
public class TsOrderExtraServiceImpl implements ITsOrderExtraService 
{
    @Autowired
    private TsOrderExtraMapper orderExtraMapper;

    /**
     * 查询订单额外费用
     * 
     * @param orderExtraId 订单额外费用主键
     * @return 订单额外费用
     */
    @Override
    public TsOrderExtra selectById(Long orderExtraId)
    {
        return orderExtraMapper.selectById(orderExtraId);
    }

    /**
     * 查询订单额外费用列表
     * 
     * @param orderExtra 订单额外费用
     * @return 订单额外费用
     */
    @Override
    public List<TsOrderExtra> selectList(TsOrderExtra orderExtra)
    {
        return orderExtraMapper.selectList(orderExtra);
    }

    /**
     * 新增订单额外费用
     * 
     * @param orderExtra 订单额外费用
     * @return 结果
     */
    @Override
    public int insert(TsOrderExtra orderExtra)
    {
        return orderExtraMapper.insert(orderExtra);
    }

    /**
     * 修改订单额外费用
     * 
     * @param orderExtra 订单额外费用
     * @return 结果
     */
    @Override
    public int update(TsOrderExtra orderExtra)
    {
        return orderExtraMapper.update(orderExtra);
    }

    /**
     * 批量删除订单额外费用
     * 
     * @param orderExtraIds 需要删除的订单额外费用主键
     * @return 结果
     */
    @Override
    public int deleteByIds(Long[] orderExtraIds)
    {
        return orderExtraMapper.deleteByIds(orderExtraIds);
    }
}
